home *** CD-ROM | disk | FTP | other *** search
Java Source | 2003-04-29 | 1.3 KB | 73 lines |
- package com.jproxy.samples.ejb.test;
-
- import java.util.*;
- import javax.ejb.*;
-
- import javax.naming.Context;
- import javax.naming.InitialContext;
- import javax.naming.NamingException;
-
- import java.rmi.RemoteException;
-
- /**
- * The most base class in Session implementation
- */
- public class Base
- implements SessionBean
- {
- /**
- * The properties of the session
- */
- protected Properties properties = null;
-
- /**
- * SessionContext of the instance
- */
- protected SessionContext context = null;
-
- /**
- * The bean create method.
- */
- public void ejbCreate()
- throws CreateException
- {
- try{
- // Context context = new InitialContext();
- // String s = (String) context.lookup("java:comp/env/TestParameter");
- // if(s!=null)
- // properties.setProperty("TestParameter", s);
- // do something. If do not like - throw CreateException
- }
- catch(Exception ne)
- {
- throw new CreateException(ne.getMessage());
- }
- }
-
- /**
- * remove() implementation
- */
- public void ejbRemove(){}
-
- /**
- * activate() implementation
- */
- public void ejbActivate(){}
-
- /**
- * passivate() implementation
- */
- public void ejbPassivate(){}
-
- /**
- * setSessionContext() implementation
- *
- * @param
- */
- public void setSessionContext(SessionContext sc)
- {
- context = sc;
- }
-
- }
-